<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器练习</title>
    <style>
        #o1{background-color: pink}
        .u1 {color: green}
        li,a{background-color: blue}
        a:link{color: green}
        a:visited{color: blue}
        a:hover{color: red}
        a:active{color: yellow}
        body>input[type='text']{color: red}
        body input[type='password']{background-color: green}
        body div div{color: green}
        body>div>div>p{background-color: red}
    </style>
</head>
<body>
<div id="o1">刘备</div><div>关羽</div><div class="u1">张飞</div>
<p>悟空</p>八戒</p><p class="u1">沙僧</p>
<ul>
    <li>水煮鱼</li><li>红烧肉</li><li class="u1">黄焖鸡</li>
</ul>
<input type="text"><input type="password">
<a href="https://www.tmooc.cn/">达内官网</a>
<div>
    <p>p1</p>
    <div><p>p2</p></div>
    <div>
        <p>p3</p>
        <div><p>p4</p></div>
    </div>
</div>
</body>
</html>